CREATE TABLE IF NOT EXISTS nodes(
    id CHAR(20) PRIMARY KEY,
    type VARCHAR(20) NOT NULL,
    name VARCHAR(255) NOT NULL,
    host VARCHAR(255) NOT NULL,
    port INTEGER NOT NULL,
    password VARCHAR(255) NOT NULL,
    path VARCHAR(255) NOT NULL,
    UNIQUE(name)
);

CREATE TABLE IF NOT EXISTS cfips(
    id CHAR(20) PRIMARY KEY,
    name VARCHAR(50) NOT NULL,
    code VARCHAR(50) NOT NULL,
    ip VARCHAR(255) NOT NULL,
    UNIQUE(code)
);

CREATE TABLE IF NOT EXISTS subs(
    id CHAR(20) PRIMARY KEY
);